#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QString>
#include <QTimer>
#include <QFileDialog>
#include "opencv2/opencv.hpp"
#include "seetafacetools.h"
#include "faceinfo.h"

QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void OpenCamera();
    void closeCamera();
    void GetFrame();

private:
    Ui::MainWindow *ui;

    SeetafaceTools stools;
    FaceInfo _data;
    FaceInfo database; // 暂时用给定路径图片
    cv::Mat cv_temp;
    cv::VideoCapture cap;
    QTimer* timer;

    QImage mat2qimage(const cv::Mat& mat);
    void ConnectSlots();

    const QString ImagePath = QCoreApplication::applicationDirPath() + "/image/";
};
#endif // MAINWINDOW_H
